package org.yecq.tradedata.craw;

import com.jhhc.baseframework.data.record.SqlOperator;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 非交易日期操作
 *
 * @author yecq
 */
@Component
class ExceptionDate {

    @Autowired
    private SqlOperator sql;

    // 判断某天是否是属于非交易日期
    boolean isExceptionDate(String date) {
        if (date.equals("")) {
            return true;
        }
        List ret = this.sql.query("select * from exception_date where date=?", date);
        return !ret.isEmpty();
    }
}
